/**
 * 
 */
package com.ltmall.api.weixin.pay.utils;

import java.io.IOException;
import java.util.Properties;


public class PropertyUtil {

	public static String getPropertyByKey(String key) {
		Properties props = new Properties();
		String value = "";
		try {
			props.load(Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("notifyConfig.properties"));
			value = props.getProperty(key);
			if (StringUtils.isNull(value)) {
				throw new RuntimeException(
						"Please configure the serverurl in the file config.properties ");
			}

		} catch (IOException e) {
			e.printStackTrace();
		}
		return value;
	}
}
